<?php
class Admin extends CI_Controller{
    var $_admin_view = '';
    
    function  __construct() {
        parent::__construct();
        $this->load->library('session');
        $this->config->load('artyproperty');
        $this->_admin_view = $this->config->item('admin_view').'wrapper.php';
    }

    function restrict_level($level){
        if($this->check_level($level) == FALSE){
            $this->redirect();
        }
    }

    function check_level($level = '1'){
        if($this->session->userdata('level') != $level){
            return FALSE;
        } else {
            return TRUE;
        }
    }
}

?>
